package com.ctshk.rpc.booking.req.outside.hotel.save;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 统一供应商预订单
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-03-09
 */
@Data
@ApiModel(value = "SupplierOrderOutsideHotelSaveReq对象", description = "统一供应商预订单")
public class SupplierOrderOutsideHotelSaveReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    private Long id;

    @Range(min = 1,max = 2,message = "提交类型值不正确(1-保存，2-提交审批)")
    @ApiModelProperty(value = "提交类型值不正确(1-保存，2-提交审批)")
    private Integer submitType;

    @ApiModelProperty(value = "审批类型(枚举SysApprovalType，当submitType为审批时，该字段必填,)")
    private Integer sysApprovalType;

    @ApiModelProperty(value = "外挂单出票类型(1:门店出票,2:后台出票)")
    private Integer ticketMode;

    @ApiModelProperty(value = "所属团期ID")
    private Long scheduleId;

    @NotNull(message = "供应商ID不能为空")
    @ApiModelProperty(value = "供应商ID")
    private Long supplierId;

    @NotNull(message = "供应商名称不能为空")
    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @NotNull(message = "供应商订单类型不能为空")
    @ApiModelProperty(value = "供应商订单类型(1:普通订单,2:内部挂账订单)")
    private String supplierOrderType;

    @NotNull(message = "供应商销售编号/部门ID不能为空")
    @ApiModelProperty(value = "供应商销售编号/部门ID(根据'供应商订单编号'显示，1：供应商销售编号，2：部门ID)")
    private String originalSaleNumber;

    @NotNull(message = "业务类型不能为空")
    @ApiModelProperty(value = "业务类型,枚举SystemBusinessType")
    private Integer businessType;

    @NotNull(message = "预订类型不能为空")
    @ApiModelProperty(value = "预订类型,(主数据)枚举SupplierReserveTypeEnum")
    private Long reserveTypeId;

    @NotNull(message = "预订类型名称不能为空")
    @ApiModelProperty(value = "预订类型名称(主数据)")
    private String reserveTypeName;

    @NotNull(message = "产品类型不能为空")
    @ApiModelProperty(value = "产品类型，枚举ProductType")
    private Integer productType;

    @ApiModelProperty(value = "资源所属部门ID(当前用户部门ID)")
    private Long departmentId;

    @ApiModelProperty(value = "资源所属部门")
    private String department;

    @ApiModelProperty(value = "供应商联络人姓名")
    private String supplierContactName;

    @ApiModelProperty(value = "供应商联络人电话区号")
    private String supplierContactMobileAreaCode;

    @ApiModelProperty(value = "供应商联络人电话")
    private String supplierContactMobile;

    @ApiModelProperty(value = "供应商联络人传真")
    private String supplierContactFax;

    @ApiModelProperty(value = "供应商联络人邮箱")
    private String supplierContactEmail;

    @ApiModelProperty(value = "我方联络人姓名")
    private String ourContactName;

    @ApiModelProperty(value = "我方联络人电话区号")
    private String ourContactMobileAreaCode;

    @ApiModelProperty(value = "我方联络人电话")
    private String ourContactMobile;

    @ApiModelProperty(value = "我方联络人邮箱")
    private String ourContactEmail;

    @ApiModelProperty(value = "我方联络人传真")
    private String ourContactFax;

    @NotNull(message = "销售单号(通用)不能为空")
    @ApiModelProperty(value = "销售单号(通用)")
    private String saleNumber;

    @NotNull(message = "产品编号(通用)不能为空")
    @ApiModelProperty(value = "产品编号(通用)")
    private String productNumber;

    @NotNull(message = "产品名称(通用)不能为空")
    @ApiModelProperty(value = "产品名称(通用)")
    private String productName;

    @NotNull(message = "总金额不能为空")
    @ApiModelProperty(value = "总金额")
    private BigDecimal totalFee;

    @NotNull(message = "币种ID不能为空")
    @ApiModelProperty(value = "币种ID")
    private Long currencyId;

    @NotNull(message = "币种不能为空")
    @ApiModelProperty(value = "币种")
    private String currency;

    @NotNull(message = "应付金额不能为空")
    @ApiModelProperty(value = "应付金额")
    private BigDecimal payableAmount;



    @NotNull(message = "付款类型ID不能为空")
    @ApiModelProperty(value = "付款类型ID,当值'内部挂账'时'scheduleId'不能为空,,枚举PayRefundMethod")
    private Long payTypeId;

    @ApiModelProperty(value = "付款类型")
    private String payType;

    @ApiModelProperty(value = "供应商期望付款时间")
    private LocalDateTime expectedPayTime;

    @ApiModelProperty(value = "附件文件JSON")
    private String filesJson;

    @ApiModelProperty(value = "确认状态")
    private Integer confirmStatus;

    @ApiModelProperty(value = "确认时间")
    private LocalDateTime confirmTime;

    @ApiModelProperty(value = "供应商订单号")
    private String supplierOrderNumber;

    @ApiModelProperty(value = "提交结算状态")
    private Integer submitSettleStatus;

    @ApiModelProperty(value = "使用资源编号")
    private String resourceNumber;

    @ApiModelProperty(value = "使用资源产品名称")
    private String resourceProductName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @Valid
    @NotEmpty(message = "酒店信息列表不能为空")
    @ApiModelProperty(value = "酒店信息列表")
    private List<SupplierOutsideOrderHotelCheckInReq> supplierOutsideOrderHotelCheckInReqList;
}
